<template>
<div class="all">
  <div class="footer">
    <span>© All Rights Reserved 2021 YancyZhang</span>
    <span><a href="https://beian.miit.gov.cn/" target="_blank">湘ICP备2021019887号-1</a></span>
<!-- pc端跳转链接-->
    <span v-if="isPc"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3329929364&site=qq&menu=yes"><img src="http://wpa.qq.com/pa?p=2:3329929364:41" alt="点击这里联系我" title="点击这里联系我"/></a></span>
<!-- 移动端跳转链接-->
    <span v-else><a target="_blank" href="mqqwpa://im/chat?chat_type=wpa&uin=3329929364&version=1&src_type=web&web_src=oicqzone.com"><img src="http://wpa.qq.com/pa?p=2:3329929364:41" alt="点击这里给我发消息" title="点击这里给我发消息" style="vertical-align: middle"/></a>点击失效尝试换个浏览器</span>
  </div>
</div>
</template>

<script>
export default {
  name: "Footer",
  data () {
    return{
      isPc: false
    }
  },
  created() {
    if(/Android|webOS|ipad|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
      this.isPc = false;
    } else {
      this.isPc = true;
    }
  }
}
</script>

<style scoped>
.all{
  margin-bottom: 0;
  background-color: #FCFCFC;
  padding: 1rem;
  border-top: 1px solid #e5e5e5;
}
.footer{
  width: 70%;
  display: flex;
  justify-content: space-around;
  margin: 0px auto;
  font-size: 14px;
}
.footer span{
  color: #BBBBBB;
  vertical-align: middle;
}
.footer a{
  color: #BBBBBB;
  text-decoration: none;
}
.footer a:hover{
  color: black;
}
/*适配ipad等平板设备*/
@media (max-width: 1500px) {
  .footer{
    font-size: 0.7rem;
    width: 100%;
  }
}
/*适配手机小屏幕设备*/
@media (max-width: 600px) {
  .all{
    font-size: 0.7rem;
    padding: 0;
    background-color: white;
  }
  .footer{
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
  }
}
</style>
